#include <kuai/misc/constant.hpp>


namespace kuai  {

	extern const Byte		BIT_FLAGS[8] = {1, 2, 4, 8, 16, 32, 64, 128};
	extern const RealNumber PI = RealNumber(3.1415926535897932384626433832795);

	extern const RealNumber LARGE_NUMBER = RealNumber(1e30);
	extern const RealNumber EPSILON = 1/LARGE_NUMBER;	// small number
	
	namespace SI {

		extern const RealNumber LIGHT_OF_SPEED	=	RealNumber(299792458.0);				//	m / s	(in vacuum);
		extern const RealNumber E_CHARGE		=	RealNumber(1.60217653e-19);			//	COULOMB (charge of electron);
		 

		extern const RealNumber GRAVITATIONAL_CONSTANT = 6.6720e-11;		// (m*m*m) / (kg*s)

		extern const RealNumber E_MASS			=	9.109534e-31;			//	kg (mass of electron);
		extern const RealNumber MASS_OF_ATOM_UNIT = 1.6605655e-27;			// kg (mass of C12 / 12)
		extern const RealNumber MASS_OF_PROTON =	1.6726485e-27;			// kg
		extern const RealNumber MASS_OF_NEUTRON =	1.6749543e-27;			// kg

        extern const RealNumber PLANCK_CONSTANT = 6.626068e-34;				// m*m*kg/s
		extern const RealNumber REDUCED_PLANCK_CONSTANT = 1.05457148e-34;	// m*m*kg/s (h/2/PI)
		extern const RealNumber BOHR_RADIUS	= 137.036045e-11;				// m
		extern const RealNumber BOLTZMANN_CONSTANT = 1.38065e-23;			// J/K
		extern const RealNumber PERMITTIVITY_OF_FREE_SPACE = 8.854187817e-12;	// C*C / J m 

		extern const RealNumber ONE_CALORIE			=  4.18400;				// J

		extern const RealNumber AVOGADRO_CONSTANT = 6.02214151e23;

		extern const RealNumber MOLAR_GAS_CONSTANT = BOLTZMANN_CONSTANT * AVOGADRO_CONSTANT;				// J / (mol*K)

		extern const RealNumber CELSIUS_0 = 273.15;							// K

		//     E_CHARGE * E_CHARGE * AVOGADRO_CONSTANT
		// k = ------------------------------------------ = 138.9354568444858031581507511681 // (kJ * A) / (e * e) / mol
		//       4 * PI * PERMITTIVITY_OF_FREE_SPACE
		extern const RealNumber COULOMB_CONST = RealNumber(SI::E_CHARGE * SI::E_CHARGE * SI::AVOGADRO_CONSTANT / 4 / PI / SI::PERMITTIVITY_OF_FREE_SPACE * 1e7);
	}

}
